<template>
	<view class="yaoqingcontainer">
		<image class="yaoimg" src="../../static/images/my/yao.png"></image>
	  <view class="outer flexcenter1">
		<view class="yaobox ffffff">
			<view class="top flexleft">
				<view class="avar">
				   <image :src="userinfo.avator"></image>	
				</view>
				<view class="right">
					<view class="nicheng">{{userinfo.nicheng}}</view>
					<view class="yaoqingma">邀请码：{{userinfo.yaoqingma}}</view>
				</view>
			</view>
			<view class="erweima">
				<image :src="userinfo.url"></image>
			</view>
		</view>
		<button class="yaoqingbtn" open-type="share" >立即邀请</button>
	  </view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				userinfo:{
				  nicheng:'',
				  avator:'',
				  url:'',
				  yaoqingma:''
				}
			};
		},
		onLoad(options) {
			let data = JSON.parse(decodeURIComponent(options.msg));
			this.userinfo.nicheng=data.nicheng
			this.userinfo.avator=data.avatar
			this.userinfo.url=data.erweima
			this.userinfo.yaoqingma=data.yaoqingma
		},
		methods:{
             onShareAppMessage(res) {
             	let path='/pages/hotel/jiudian';
             	if(uni.getStorageSync('user_id')){
             		path='/pages/hotel/jiudian?referee_id='+uni.getStorageSync('user_id');
             	}
             	return {
             		title: '季忆水雲乡',
             		path:path,
             		// imageUrl:'../../static/person_img.png'
             		
             	}
             },
             onShareTimeline(res) {
             	let path='/pages/hotel/jiudian';
             	if(uni.getStorageSync('user_id')){
             		path='/pages/hotel/jiudian?referee_id='+uni.getStorageSync('user_id');
             	}
             	return {
             		title: '季忆水雲乡',
             		path:path,
             		// imageUrl:'../../static/person_img.png'
             		
             	}
             },
		},
	}
</script>

<style lang="scss" scoped>
.yaoqingcontainer{
	min-height: 100vh;
	box-sizing: border-box;
}
.yaoimg{
	width: 100%;
	position: absolute;
	z-index: -1;
	height: 100%;
}
.yaobox{
	// background-image: url('../../static/images/my/yao.png');
	padding-top: 40rpx 0;
	margin-top: 500rpx;
	border-radius: 40rpx;
	padding: 30rpx 50rpx;
	.top{
		
	}
	.right{
		
	}
}
.avar{
	width: 95rpx;
	height: 95rpx;
	margin-right: 12rpx;
	border-radius: 50%;
	image{
		width: 100%;
		height: 100%;
	}
}
.nicheng{
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 800;
	color: #000000;
}
.yaoqingma{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #000000;
}
.erweima{
	margin-top: 20rpx;
	width: 431rpx;
	height: 431rpx;
	image{
		width: 100%;
		height: 100%;
	}
}
.yaoqingbtn{
	width: calc(100vw - 60rpx);
	text-align: center;
	padding: 8rpx 0;
	margin-top: 135rpx;
	background-color: #FC4C4C;
	color: #fff;
	border-radius: 64rpx;
}
</style>
